****** Table_11_4:  Sample Restrictions
use data/Demo_book_country_3.dta, clear
************ democracy variables

* polyarchy, 100-point scale
gen v2x_polyarchy_100 = (v2x_polyarchy / .924) * 100

* polyarchy, missing obs imputed
impute v2x_polyarchy lexical_index inc_chall_combined , gen(v2x_polyarchy_imp)
* 100-point scale
replace v2x_polyarchy_imp = v2x_polyarchy_imp * 100
gen v2x_polyarchy_imp_100 = (v2x_polyarchy_imp / 92.4) * 100
replace v2x_polyarchy_imp_100 = . if sovereign_Cojocaru ==.


*1) benchmark
qui reg v2x_polyarchy_imp_100 eur_pct_est_smooth predallports53_100km lp_lat_abst i.year, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_11_4.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_pct_est_smooth) replace
qui drop sample

*2) non-european world
qui reg v2x_polyarchy_imp_100 eur_pct_est_smooth predallports53_100km lp_lat_abst i.year if europe_harbors_def == 0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_11_4.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_pct_est_smooth) append
qui drop sample

*3) non-British world
qui reg v2x_polyarchy_imp_100 eur_pct_est_smooth predallports53_100km lp_lat_abst i.year if britain == 0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_11_4.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_pct_est_smooth) append
qui drop sample

*4) excluding European-dominated countries
qui reg v2x_polyarchy_imp_100 eur_pct_est_smooth predallports53_100km lp_lat_abst i.year if eur_pct_est_smooth < 80, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_11_4.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_pct_est_smooth) append
qui drop sample

*5) excluding countries with few Europeans
qui reg v2x_polyarchy_imp_100 eur_pct_est_smooth predallports53_100km lp_lat_abst i.year if eur_pct_est_smooth > 5, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_11_4.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_pct_est_smooth) append
qui drop sample

*6) Non-sovereign
qui reg v2x_polyarchy_imp_100 eur_pct_est_smooth predallports53_100km lp_lat_abst i.year if sovereign_Cojocaru == 0, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_11_4.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_pct_est_smooth) append
qui drop sample

*7) Sovereign
qui reg v2x_polyarchy_imp_100 eur_pct_est_smooth predallports53_100km lp_lat_abst i.year if sovereign_Cojocaru == 1, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_11_4.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_pct_est_smooth) append
qui drop sample

*** Regions

*8) Europe, Russia, Central Asia	
qui reg v2x_polyarchy_imp_100 eur_pct_est_smooth predallports53_100km lp_lat_abst i.year if e_regionpol4 ==1, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_11_4.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_pct_est_smooth) append
qui drop sample

*9) Americas	
qui reg v2x_polyarchy_imp_100 eur_pct_est_smooth predallports53_100km lp_lat_abst i.year if e_regionpol4 ==2, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_11_4.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_pct_est_smooth) append
qui drop sample

*10) MENA	
qui reg v2x_polyarchy_imp_100 eur_pct_est_smooth predallports53_100km lp_lat_abst i.year if e_regionpol4 ==3, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_11_4.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_pct_est_smooth) append
qui drop sample

*11) Sub-Saharan Africa	
qui reg v2x_polyarchy_imp_100 eur_pct_est_smooth predallports53_100km lp_lat_abst i.year if e_regionpol4 ==4, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_11_4.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_pct_est_smooth) append
qui drop sample

*12) East, Southeast, South Asia, Pacific
qui reg v2x_polyarchy_imp_100 eur_pct_est_smooth predallports53_100km lp_lat_abst i.year if e_regionpol4 ==5, vce(cluster country_id)
qui gen sample = e(sample)
qui tab country_id if sample == 1, nofreq
qui local countries=r(r)
qui tab year if sample == 1, nofreq
qui local years=r(r)
qui outreg2 using output/Table_11_4.doc, nor noni nonot nocon stats(coef tstat) addstat("Countries", `countries', "Years", `years', "R-squared", e(r2)) addn("*** p<0.01, ** p<0.05, * p<0.1") se bdec(3) keep(eur_pct_est_smooth) append
qui drop sample

